package com.tdkj.model.information;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.common.BeanFile;
import com.tdkj.model.user.BeanUser;

/**
 * XnkyExperts entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "xnky_expert")
public class BeanExpert extends BaseEntity implements java.io.Serializable {

	// Fields

	private String experttype;
	private String expertname;
	private Timestamp birthday;
	private String degree;
	private String technicaltitle;//技术职称
	private String specialtitle;//特殊称号
	private String address;
	private String unit;
	private String city;
	private String postcode;
	private String telephone;
	private String qq;
	private String email;
	private String certificateno;
	private Timestamp registertime;
	private Timestamp lastlogintime;
	private String major;//专业
	private String status;//状态分为{0：专家；1：取消}
	private String ip;
	private String ipinfor;
	private String discription;
	private BeanUser user;
	private String headurl;
	private List<BeanBaseInfo> articles = new ArrayList<BeanBaseInfo>(0);
	private List<BeanFile> photos=new ArrayList<BeanFile>();

	// Constructors

	/** default constructor */
	public BeanExpert() {
	}
	public BeanExpert(String experttype, String expertname, Timestamp birthday,
			String degree, String technicaltitle, String specialtitle,
			String address, String unit, String postcode, String qq,
			String email, String major, String status, String discription,
			String headurl) {
		super();
		this.experttype = experttype;
		this.expertname = expertname;
		this.birthday = birthday;
		this.degree = degree;
		this.technicaltitle = technicaltitle;
		this.specialtitle = specialtitle;
		this.address = address;
		this.unit = unit;
		this.postcode = postcode;
		this.qq = qq;
		this.email = email;
		this.major = major;
		this.status = status;
		this.discription = discription;
		this.headurl = headurl;
	}


	@Column(name = "experttype", length = 40)
	public String getExperttype() {
		return this.experttype;
	}

	public void setExperttype(String experttype) {
		this.experttype = experttype;
	}

	@Column(name = "expertname", length = 40)
	public String getExpertname() {
		return this.expertname;
	}

	public void setExpertname(String expertname) {
		this.expertname = expertname;
	}

	@Column(name = "birthday", length = 19)
	public Timestamp getBirthday() {
		return this.birthday;
	}

	public void setBirthday(Timestamp birthday) {
		this.birthday = birthday;
	}

	@Column(name = "degree", length = 40)
	public String getDegree() {
		return this.degree;
	}

	public void setDegree(String degree) {
		this.degree = degree;
	}
	@Column(name = "telephone", length = 40)
	public String getTelephone() {
		return telephone;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	@Column(name = "technicaltitle", length = 40)
	public String getTechnicaltitle() {
		return this.technicaltitle;
	}

	public void setTechnicaltitle(String technicaltitle) {
		this.technicaltitle = technicaltitle;
	}

	@Column(name = "address", length = 40)
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "unit", length = 40)
	public String getUnit() {
		return this.unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}
	@Column(name = "certificateno", length = 40)
	public String getCertificateno() {
		return certificateno;
	}
	public void setCertificateno(String certificateno) {
		this.certificateno = certificateno;
	}
	@Column(name = "city", length = 40)
	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column(name = "postcode", length = 40)
	public String getPostcode() {
		return this.postcode;
	}

	public void setPostcode(String postcode) {
		this.postcode = postcode;
	}

	@Column(name = "qq", length = 40)
	public String getQq() {
		return this.qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}
	@Column(name = "specialtitle", length = 40)
	public String getSpecialtitle() {
		return specialtitle;
	}

	public void setSpecialtitle(String specialtitle) {
		this.specialtitle = specialtitle;
	}
	@Column(name = "major", length = 40)
	public String getMajor() {
		return major;
	}

	public void setMajor(String major) {
		this.major = major;
	}

	@Column(name = "email", length = 40)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	@Column(name = "headurl", length = 200)
	public String getHeadurl() {
		return headurl;
	}

	public void setHeadurl(String headurl) {
		this.headurl = headurl;
	}

	@Column(name = "registertime", length = 19)
	public Timestamp getRegistertime() {
		return this.registertime;
	}

	public void setRegistertime(Timestamp registertime) {
		this.registertime = registertime;
	}

	@Column(name = "lastlogintime", length = 19)
	public Timestamp getLastlogintime() {
		return this.lastlogintime;
	}

	public void setLastlogintime(Timestamp lastlogintime) {
		this.lastlogintime = lastlogintime;
	}

	@Column(name = "ip", length = 40)
	public String getIp() {
		return this.ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	@Column(name = "ipinfor", length = 40)
	public String getIpinfor() {
		return this.ipinfor;
	}

	public void setIpinfor(String ipinfor) {
		this.ipinfor = ipinfor;
	}

	@Column(name = "discription", length = 40)
	public String getDiscription() {
		return this.discription;
	}

	public void setDiscription(String discription) {
		this.discription = discription;
	}

	@Column(name = "status", length = 40)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "expert")
	public List<BeanFile> getPhotos() {
		return photos;
	}

	public void setPhotos(List<BeanFile> photos) {
		this.photos = photos;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "expert")
	public List<BeanBaseInfo> getArticles() {
		return articles;
	}

	public void setArticles(List<BeanBaseInfo> articles) {
		this.articles = articles;
	}

	@OneToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY)
	public BeanUser getUser() {
		return user;
	}

	public void setUser(BeanUser user) {
		this.user = user;
	}

	
}